import CryptoJS from 'crypto-js'

const iv = CryptoJS.enc.Utf8.parse('8811772266334455')
const key = CryptoJS.enc.Utf8.parse("heklhjasdklhfglkjasdfblasdjfallo");
export function encrypt(data) {
    const encrypted = CryptoJS.AES.encrypt(data, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
    return encrypted.toString();
}
export function decrypt(data) {
    const decrypted = CryptoJS.AES.decrypt(data, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
    return decrypted.toString(CryptoJS.enc.Utf8);
}